package bytestream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.PrintStream;
import java.io.FileNotFoundException;
public class J_PrintStream
{
    public static void main(String args[ ])
{        try{
            PrintStream f = new PrintStream(new FileOutputStream("out.txt"));
            f.println(""+1+"+"+2+"="+(1+2));
            f.close( );
        }
        catch (FileNotFoundException e)
        {
            System.err.println("发生异常:" + e);
            e.printStackTrace( );
        } // try-catch结构结束
    } // 方法main结束
} // 类J_PrintStream结束
